<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:76:"D:\phpstudy_pro\WWW\nmg001\public/../application/admin\view\set\varlist.html";i:1657952133;}*/ ?>
 <!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?php echo $setting['webname']; ?>-系统变量</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="shortcut icon" href="favicon.ico"> <link href="/public/static/admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/public/static/admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="/public/static/admin/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="/public/static/admin/css/animate.css" rel="stylesheet">
    <link href="/public/static/admin/css/style.css?v=4.1.0" rel="stylesheet">
	<style>
	  .tools a i{
	    color:#19a9d5
	  }
	  .tools a i:hover{
	    text-shadow:0px 0px 5px #19a9d5;
	  }
	</style>

</head>

<body class="gray-bg">
    <div class="row wrapper border-bottom white-bg page-heading">
        <div class="col-sm-4">
            <h2>系统变量</h2>
            <ol class="breadcrumb">
                <li>
                    <a href="<?php echo url('Admins/admin'); ?>">主页</a>
                </li>
                <li>
                    <strong>系统变量</strong>
                </li>
            </ol>
        </div>
    </div>
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>系统变量列表</h5>
                        <div class="ibox-tools tools">
							<a href="<?php echo url('Set/addform'); ?>"><i class="glyphicon glyphicon-plus" title="添加变量"></i></a>
						</div>
                    </div>
                    <div class="ibox-content">
                        <div class="row">
                            <div class="col-sm-3">
                                <div class="input-group">
                                    <!--<input type="text" placeholder="请输入关键词" class="input-sm form-control"><span class="input-group-btn">-->
                                    <!--<button type="button" class="btn btn-sm btn-primary"> 搜索</button> </span>-->
                                </div>
                            </div>
                        </div>
                        <div class="table-responsive">
                            <table class="table table-striped">
                                    <tr>
                                        <th>说明</th>
                                        <th>名称</th>
                                        <th>值</th>
                                        <th>排序</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                <?php foreach($list as $vo): ?>
                                    <tr>
                                        <td><?php echo $vo['description']; ?></td>
                                        <td><?php echo $vo['k']; ?></td>
                                        <td><?php if(preg_match('/png|jpg|gif|ico/',$vo['val'])): ?> <img src="/public/static/admin/uploads/set/<?php echo $vo['val']; ?>" alt="" style="max-width: 50px;"><?php else: ?> <?php echo $vo['val']; endif; ?></td>
                                        <td><?php echo $vo['sort']; ?></td>
                                        <td class="tools"><a href="<?php echo url('Set/update'); ?>?id=<?php echo $vo['id']; ?>"><i class="glyphicon glyphicon-pencil" style="color:#19a9d5"></i></a> &nbsp; <!--<a class="del" data-id="<?php echo $vo['id']; ?>"><i class="glyphicon glyphicon-trash"style="color:#19a9d5"></i></a>--></td>
                                    </tr>
                                <?php endforeach; ?>
                            </table>
                        </div>

                    </div>
                </div>
            </div>

        </div>
    </div>

    <!-- 全局js -->
    <script src="/public/static/admin/js/jquery.min.js?v=2.1.4"></script>
    <script src="/public/static/admin/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- Peity -->

    <script src="/public/static/admin/layui/layui.js"></script>
    <script>
        layui.use('layer', function(){ //独立版的layer无需执行这一句
            var $ = layui.jquery, layer = layui.layer; //独立版的layer无需执行这一句
            //点击提交
            $(".del").click(function(){
                $.post("<?php echo url('Set/delete'); ?>",{id:$(this).attr('data-id')},function(data){
                    top.layer.msg(data.msg,{time:2000,shade:0.5},function(){
                        if(data.url){
                            window.location.href = data.url;
                        }
                    });

                });
            });
        });
    </script>

    
    

</body>

</html>
